home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_400
/
414_01
/
command.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-15
|
29KB
|
358 lines
/*
* THE - The Hessling Editor. A text editor similar to VM/CMS xedit.
* Copyright (C) 1991-1993 Mark Hessling
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to:
*
* The Free Software Foundation, Inc.
* 675 Mass Ave,
* Cambridge, MA 02139 USA.
*
*
* If you make modifications to this software that you feel increases
* it usefulness for the rest of the community, please email the
* changes, enhancements, bug fixes as well as any and all ideas to me.
* This software is going to be maintained and enhanced as deemed
* necessary by the community.
*
* Mark Hessling email: M.Hessling@gu.edu.au
* 36 David Road Phone: +61 7 849 7731
* Holland Park Fax: +61 7 875 5314
* QLD 4121
* Australia
*/
/*
$Header: C:\THE\RCS\command.h 1.4 1993/09/01 16:25:48 MH Interim MH $
*/
struct commands
{
char *text;
unsigned short min_len;
unsigned int funkey;
#ifdef PROTO
int (*function)(char *);
#else
int (*function)();
#endif
bool valid_profile_command;
bool set_command;
bool sos_command;
bool strip_param;
char *params;
};
typedef struct commands COMMAND;
#include "proto.h"
/*---------------------- *** IMPORTANT *** ----------------------------*/
/* Make sure that there is no chance two or more commands can be */
/* matched based on number of significant charcters. */
/*---------------------- *** IMPORTANT *** ----------------------------*/
/* Prof / Set / SOS /strip */
COMMAND command[] =
{
{(char *)"add", 3, (-1), Add, TRUE, FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
{(char *)"all", 3, (-1), All, TRUE, FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"arbchar", 3, (-1), Arbchar, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"autosave", 2, (-1), Autosave, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"backup", 4, (-1), Backup, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"beep", 4, (-1), BeepSound, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
#if defined(DOS) || defined(OS2)
{(char *)"backward", 2, KEY_PGUP, Backward, FALSE,FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
#else
{(char *)"backward", 2, KEY_PPAGE, Backward, FALSE,FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
{(char *)"backward", 2, KEY_PrevScrn, Backward, FALSE,FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
#endif
{(char *)"bottom", 3, (-1), Bottom, TRUE, FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"cancel", 3, (-1), Cancel, TRUE, FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"case", 4, (-1), Case, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"ccancel", 2, (-1), Ccancel, TRUE, FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"change", 1, (-1), Change, TRUE, FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"clearscreen", 6, (-1), Clearscreen, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"clock", 5, (-1), Clock, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
#if defined(DOS) || defined(OS2)
{(char *)"cmatch", 0, KEY_F7, Cmatch, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
#else
{(char *)"cmatch", 0, KEY_F(7), Cmatch, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
#endif
{(char *)"cmdarrows", 4, (-1), Cmdarrows, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"cmdline", 3, (-1), Cmdline, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"cmsg", 4, (-1), Cmsg, FALSE,FALSE,FALSE,FALSE,(char *)""}, /* comm1.c */
{(char *)"command", 7, (-1), Command, TRUE, FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"colour", 6, (-1), Colour, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"color", 5, (-1), Colour, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"copy", 4, (-1), Copy, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
#if defined(DOS) || defined(OS2)
{(char *)"control_char",0, KEY_F12, Control_char,FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"copy", 0, KEY_A_c, Copy, FALSE,FALSE,FALSE,TRUE, (char *)"block reset"}, /* comm1.c */
{(char *)"copy", 0, KEY_A_k, Copy, FALSE,FALSE,FALSE,TRUE, (char *)"block"}, /* comm1.c */
#else
{(char *)"control_char",0, KEY_F(6), Control_char,FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"copy", 0, ControlC, Copy, FALSE,FALSE,FALSE,TRUE, (char *)"block reset"}, /* comm1.c */
{(char *)"copy", 0, ControlK, Copy, FALSE,FALSE,FALSE,TRUE, (char *)"block"}, /* comm1.c */
#endif
{(char *)"curline", 4, (-1), Curline, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"define", 3, (-1), Define, TRUE, FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
{(char *)"delete", 3, (-1), DeleteLine, TRUE, FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
#if defined(DOS) || defined(OS2)
{(char *)"delete", 0, KEY_A_g, DeleteLine, FALSE,FALSE,FALSE,TRUE, (char *)"block"}, /* comm1.c */
#else
{(char *)"delete", 0, ControlG, DeleteLine, FALSE,FALSE,FALSE,TRUE, (char *)"block"}, /* comm1.c */
#endif
{(char *)"directory", 3, (-1), Directory, FALSE,FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
{(char *)"dirinclude", 4, (-1), Dirinclude, TRUE, TRUE, FALSE,TRUE, (char *)"*"}, /* commset1.c */
{(char *)"ls", 2, (-1), Directory, FALSE,FALSE,FALSE,TRUE, (char *)"1"}, /* comm1.c */
{(char *)"display", 4, (-1), Display, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"down", 1, (-1), Next, TRUE, FALSE,FALSE,TRUE, (char *)"1"}, /* comm3.c */
{(char *)"duplicate", 3, (-1), Duplicate, TRUE, FALSE,FALSE,TRUE, (char *)""}, /* comm2.c */
#if defined(DOS) || defined(OS2)
{(char *)"down_arrow", 0, KEY_CURD, Down_arrow, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"duplicate", 0, KEY_A_d, Duplicate, TRUE, FALSE,FALSE,TRUE, (char *)"1 BLOCK"}, /* comm2.c */
#else
{(char *)"down_arrow", 0, KEY_DOWN, Down_arrow, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm1.c */
{(char *)"duplicate", 0, ControlD, Duplicate, TRUE, FALSE,FALSE,TRUE, (char *)"1 BLOCK"}, /* comm2.c */
{(char *)"enter", 0, ControlM, Enter, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm2.c */
{(char *)"enter", 0, KEY_ENTER, Enter, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm2.c */
#endif
{(char *)"enter", 0, KEY_RETURN, Enter, FALSE,FALSE,FALSE,TRUE, (char *)""}, /* comm2.c */
{(char *)"emsg", 4, (-1), Emsg, TRUE, FALSE,FALSE,FALSE,(char *)""}, /* comm2.c */
{(char *)"eolout", 4, (-1), Eolout, TRUE, TRUE, FALSE,TRUE, (char *)""}, /* commset1.c */
{(char *)"etmode", 6, (-1), Etmode, TRUE, T